<%--
  Created by IntelliJ IDEA.
  User: 86152
  Date: 2020/11/6
  Time: 20:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>开始使用layui</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>

<body class="layui-bg-cyan">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo" style="color: #01AAED;">学生信息管理系统</p>
        </div>
        <ul class="layui-nav ">
            <li class="layui-nav-item layui-col-lg-offset10">
                <a ><img src="layui/images/log.jpg" class="layui-nav-img">${username}</a>
                <dl class="layui-nav-child">
                    <dd>
                        <a >修改信息</a>
                    </dd>
                    <dd>
                        <a href="exit.action">退出</a>
                        <form action="exit.action" method="post">
                        </form>
                    </dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">信息处理</a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="addInterface.jsp">添加</a>
                        </dd>
                        <dd>
                            <a href="updateInterface.jsp">修改</a>
                        </dd>
                        <dd>
                            <a href="deleteInterface.jsp">删除</a>
                        </dd>
                        <dd>
                            <form action="viewAll.action" method="post">
                                <input type="submit" class="layui-btn layui-nav-item layui-bg-blue " value="查看全部">

                            </form>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <div style="padding: 10px;">
            <form action="inputInformation.action" method="post">
                <table class="layui-table">
                    <colgroup>
                        <col width="150">
                        <col width="200">
                        <col>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>姓名</th>
                        <th>年龄</th>
                        <th>性别</th>
                        <th>专业</th>
                    </tr>
                    </thead>
                    <%
                        int i = Integer.parseInt(request.getParameter("num"));
                        request.setAttribute("num",i);
                    %>
                    <%--    没有脑壳的方法
                                    <%
                        for (int j = 0; j < i; j++) {
                    %>
                    <tbody>
                    <tr>
                        <td><input type="text" class="layui-input" name="name"></td>
                        <td><input type="text" class="layui-input" name="age"></td>
                        <td><input type="text" class="layui-input" name="sex"></td>
                        <td><input type="text" class="layui-input" name="dept"></td>
                    </tr>
                    <%
                        }
                    %>
                    <tr>
                        <td colspan="2"><input type="submit" class="layui-btn"></td>
                        <td colspan="2" ><input type="reset" class="layui-btn"></td>


                    </tr>
                    </tbody>--%>
                    <tbody>
                    <c:forEach begin="1" end="${num}" >
                        <tr>
                            <td><input type="text" class="layui-input" name="name"></td>
                            <td><input type="text" class="layui-input" name="age"></td>
                            <td><input type="text" class="layui-input" name="sex"></td>
                            <td><input type="text" class="layui-input" name="dept"></td>
                        </tr>
                    </c:forEach>
                    <tr>
                        <td colspan="2"><input type="submit" class="layui-btn"></td>
                        <td colspan="2" ><input type="reset" class="layui-btn"></td>
                    </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
</div>
</div>
<script src="layui/layui.js"></script>
<script>
    layui.use('element', function() {
        var element = layui.element;
    });
</script>
</body>

</html>
